support extension on Garden resource#280
Conversation
677f076 to
6cc819a
Compare
timebertt
left a comment
There was a problem hiding this comment.
Partial review together with @MichaelEischer @mstueer @hammadzf
| - get | ||
| - list | ||
| - watch | ||
| {{- end }} |
There was a problem hiding this comment.
Please double-check if we need all of the remaining permissions in the garden case.
There was a problem hiding this comment.
I think having a seperate roles that clearly define which permissions are granted for the extensions is easier to read. I will refactor this.
| var gardenCluster cluster.Cluster | ||
| if kFile := os.Getenv("GARDEN_KUBECONFIG"); kFile != "" { | ||
| var err error | ||
| gardenCluster, err = setupGardenCluster(mgr, kFile) |
There was a problem hiding this comment.
This should happen in app.go not in the controller package
There was a problem hiding this comment.
I agree, but there where would I put the cluster to pass it through to the predicate?
The controllers are registered via controllerSwitches which expects the AddToManger(ctx, mgr) signature.
Binding to AddOptions could be an option, but this seems a bit weird. WDYT?
There was a problem hiding this comment.
I suggest passing a new cluster.Cluster param to ControllerSwitches, then you can wrap the actual AddToManager(ctx, mgr, cluster) call in a func(context.Context, manager.Manager)
There was a problem hiding this comment.
This does not work well because the controller switches are registered before the manager is setup and I would like to setup the cluster next to the manager.
04a3249 to
fd64462
Compare
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
What this PR does / why we need it:
Allows to use the ACL extension to restrict access to the virtual garden API server
Which issue(s) this PR fixes:
Fixes gardener/hackathon#47
Special notes for your reviewer: